import request from '@/utils/request'

// 查询演职人员列表
export function listCast(query) {
  return request({
    url: '/movie/cast/list',
    method: 'get',
    params: query
  })
}

// 查询演职人员详细
export function getCast(castId) {
  return request({
    url: '/movie/cast/' + castId,
    method: 'get'
  })
}

// 新增演职人员
export function addCast(data) {
  return request({
    url: '/movie/cast',
    method: 'post',
    data: data
  })
}

// 修改演职人员
export function updateCast(data) {
  return request({
    url: '/movie/cast',
    method: 'put',
    data: data
  })
}

// 删除演职人员
export function delCast(castId) {
  return request({
    url: '/movie/cast/' + castId,
    method: 'delete'
  })
}